<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>Dinic: Fichero Fuente apifiles/_queue.c</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Dinic
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">Documentacion de la API de DINIC para la catedra de Matemática Discreta II.</div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Buscar" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generado por Doxygen 1.8.8 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Buscar');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('__queue_8c_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Todo</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Estructuras de Datos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Archivos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Funciones</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>&apos;typedefs&apos;</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>&apos;defines&apos;</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">_queue.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="__queue_8c.html">Ir a la documentación de este archivo.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &lt;assert.h&gt;</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &lt;stdlib.h&gt;</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="__queue_8h.html">_queue.h</a>&quot;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;</div>
<div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="structQElem.html">   10</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>QElemSt{</div>
<div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="structQElem.html#a0f0b31748cf47160d9bfb0759ec301a2">   11</a></span>&#160;    <span class="keywordtype">void</span> *<a class="code" href="structQElem.html#a0f0b31748cf47160d9bfb0759ec301a2">elem</a>;             </div>
<div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="structQElem.html#ac95f7bec7306cc01964153958c68843b">   12</a></span>&#160;    <span class="keyword">struct </span>QElemSt *<a class="code" href="structQElem.html#ac95f7bec7306cc01964153958c68843b">next</a>;   </div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;}<a class="code" href="structQElem.html">QElem</a>;</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div>
<div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="structQueueSt.html">   20</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structQueueSt.html">QueueSt</a>{</div>
<div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="structQueueSt.html#a9547aa377ca288e36818fc398d39a826">   21</a></span>&#160;    <a class="code" href="structQElem.html">QElem</a> *<a class="code" href="structQueueSt.html#a9547aa377ca288e36818fc398d39a826">head</a>;  </div>
<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="structQueueSt.html#a47afe2083ee433b7d1a43f861482593f">   22</a></span>&#160;    <a class="code" href="structQElem.html">QElem</a> *<a class="code" href="structQueueSt.html#a47afe2083ee433b7d1a43f861482593f">tail</a>;  </div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="structQueueSt.html#a439227feff9d7f55384e8780cfc2eb82">   23</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="structQueueSt.html#a439227feff9d7f55384e8780cfc2eb82">size</a>;     </div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;};</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="__queue_8h.html#a24a786275016ae7b4831f94fa44dd6a8">   30</a></span>&#160;<a class="code" href="structQueue.html">Queue</a> <a class="code" href="__queue_8c.html#a24a786275016ae7b4831f94fa44dd6a8">queue_create</a>(<span class="keywordtype">void</span>){</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <a class="code" href="structQueue.html">Queue</a> Q = NULL; <span class="comment">/*La nueva cola*/</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    Q = (<a class="code" href="structQueue.html">Queue</a>) malloc (<span class="keyword">sizeof</span>(<span class="keyword">struct</span> <a class="code" href="structQueueSt.html">QueueSt</a>));</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <span class="keywordflow">if</span> (Q != NULL){</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        Q-&gt;head = NULL;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        Q-&gt;tail = NULL;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        Q-&gt;size = 0;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    }</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <span class="keywordflow">return</span> Q;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;}</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="__queue_8h.html#a04a047a583d8f00d4c8ae2dbc4eb4dc5">   49</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="__queue_8c.html#aa4f9f9bfddcb1edb5edce74730fe309b">queue_enqueue</a>(<a class="code" href="structQueue.html">Queue</a> Q, <span class="keywordtype">void</span> * q){</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <a class="code" href="structQElem.html">QElem</a> *<span class="keyword">new</span> = NULL;  <span class="comment">/*El nuevo elemento a apilar*/</span></div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keywordtype">int</span> result = 0;     <span class="comment">/*1 = esta todo OK*/</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    </div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <span class="keyword">new</span> = (<a class="code" href="structQElem.html">QElem</a>*) malloc (<span class="keyword">sizeof</span>(<span class="keyword">struct</span> QElemSt));</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keywordflow">if</span> (<span class="keyword">new</span> != NULL){</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <span class="keyword">new</span>-&gt;<a class="code" href="structQElem.html#a0f0b31748cf47160d9bfb0759ec301a2">elem</a> = q;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        <span class="keyword">new</span>-&gt;next = NULL;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <span class="keywordflow">if</span>(<a class="code" href="__queue_8c.html#ae9892369297db38bc1b7955a310f8c30">queue_isEmpty</a>(Q)){</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;            Q-&gt;head = <span class="keyword">new</span>;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;            Q-&gt;tail = Q-&gt;head;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        }<span class="keywordflow">else</span>{</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;            Q-&gt;tail-&gt;next = <span class="keyword">new</span>;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;            Q-&gt;tail = <span class="keyword">new</span>;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        }</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        Q-&gt;size ++;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        result = 1;</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    }</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <span class="keywordflow">return</span> result;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;}</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="__queue_8h.html#a1f8653e2322de90458051e3061af90ce">   75</a></span>&#160;<span class="keywordtype">void</span> * <a class="code" href="__queue_8c.html#a1f8653e2322de90458051e3061af90ce">queue_dequeue</a>(<a class="code" href="structQueue.html">Queue</a> Q){</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <a class="code" href="structQElem.html">QElem</a> *aux = NULL;  <span class="comment">/*Puntero auxiliar para no perder referencias*/</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="keywordtype">void</span> *elem = NULL;  <span class="comment">/*El elemento de la estructura encolada*/</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    </div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    assert(Q != NULL &amp;&amp; !<a class="code" href="__queue_8c.html#ae9892369297db38bc1b7955a310f8c30">queue_isEmpty</a>(Q));</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    </div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    aux = Q-&gt;head;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="keywordflow">if</span>(aux-&gt;<a class="code" href="structQElem.html#ac95f7bec7306cc01964153958c68843b">next</a> != NULL){</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        Q-&gt;head = Q-&gt;head-&gt;next;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    }<span class="keywordflow">else</span>{</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        Q-&gt;head = NULL;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        Q-&gt;tail = NULL;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    }</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    elem = aux-&gt;<a class="code" href="structQElem.html#a0f0b31748cf47160d9bfb0759ec301a2">elem</a>;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    free(aux);</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    Q-&gt;size --;</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keywordflow">return</span> elem;</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;}</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="__queue_8h.html#a211ac9b50a8c7917a328cf68efb1f7e9">   99</a></span>&#160;<span class="keywordtype">void</span> * <a class="code" href="__queue_8c.html#a211ac9b50a8c7917a328cf68efb1f7e9">queue_head</a>(<a class="code" href="structQueue.html">Queue</a> Q){</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keywordtype">void</span> * result = NULL;  <span class="comment">/*El elemento cabecera que retorno*/</span></div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    assert(Q!=NULL );</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <span class="keywordflow">if</span> (Q-&gt;head != NULL)</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        result = Q-&gt;head-&gt;elem;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <span class="keywordflow">return</span> result;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    </div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;}</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="__queue_8h.html#ae9892369297db38bc1b7955a310f8c30">  114</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="__queue_8c.html#ae9892369297db38bc1b7955a310f8c30">queue_isEmpty</a>(<a class="code" href="structQueue.html">Queue</a> Q){</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    assert(Q != NULL);</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    <span class="keywordflow">return</span> (Q-&gt;tail == NULL);</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;}</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div>
<div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="__queue_8h.html#aa3ba377a4b21e817c50a4e52607cb94a">  131</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="__queue_8c.html#aa3ba377a4b21e817c50a4e52607cb94a">queue_destroy</a> (<a class="code" href="structQueue.html">Queue</a> Q, <span class="keywordtype">void</span> ** garbage){</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="keywordtype">int</span> result = -1;    <span class="comment">/*Retorno de la operacion*/</span></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="keywordtype">int</span> i = 0;          <span class="comment">/*Contador de elementos que despilo*/</span></div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <span class="keywordtype">int</span> qSize;          <span class="comment">/*Tamaño de la cola*/</span></div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <span class="keywordtype">void</span> *elem;         <span class="comment">/*El elemento que se descola*/</span></div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    </div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    assert(Q != NULL);</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    </div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    qSize = <a class="code" href="__queue_8c.html#a1def9cad01fbb534514155b984cde15a">queue_size</a>(Q);</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    <span class="comment">/*Hasta vaciar la cola, despilo los elementos*/</span></div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    <span class="keywordflow">while</span>(!<a class="code" href="__queue_8c.html#ae9892369297db38bc1b7955a310f8c30">queue_isEmpty</a>(Q)){</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;        <span class="comment">/*Si quiere referencia a los elementos, se los dejo en garbage*/</span></div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;        elem = <a class="code" href="__queue_8c.html#a1f8653e2322de90458051e3061af90ce">queue_dequeue</a>(Q);</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        <span class="keywordflow">if</span>(garbage != NULL){</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;            garbage[i] = elem;</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;        }</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        i ++;</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    }</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    <span class="comment">/*Si descole todos los elementos, ya puedo destruir la cola*/</span></div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    <span class="keywordflow">if</span>(qSize == i){</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        result = i;</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        free(Q);</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        Q = NULL;</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    }</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <span class="keywordflow">return</span> result;</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;}</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;</div>
<div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="__queue_8h.html#a1def9cad01fbb534514155b984cde15a">  163</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="__queue_8c.html#a1def9cad01fbb534514155b984cde15a">queue_size</a> (<a class="code" href="structQueue.html">Queue</a> Q){</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    assert(Q != NULL);</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    <span class="keywordflow">return</span> (Q-&gt;size);</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;}</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div>
<div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="__queue_8h.html#ac713676fd6b09455383d4f6276ce1d8d">  172</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="__queue_8c.html#ac713676fd6b09455383d4f6276ce1d8d">queue_swap</a> (<a class="code" href="structQueue.html">Queue</a> *Q1, <a class="code" href="structQueue.html">Queue</a> *Q2){</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <a class="code" href="structQueue.html">Queue</a> qAux = *Q1;    </div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    *Q1 = *Q2;</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    *Q2 = qAux;</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;}</div>
<div class="ttc" id="__queue_8c_html_ac713676fd6b09455383d4f6276ce1d8d"><div class="ttname"><a href="__queue_8c.html#ac713676fd6b09455383d4f6276ce1d8d">queue_swap</a></div><div class="ttdeci">void queue_swap(Queue *Q1, Queue *Q2)</div><div class="ttdoc">Permutación entre las colas. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00172">_queue.c:172</a></div></div>
<div class="ttc" id="__queue_8c_html_aa4f9f9bfddcb1edb5edce74730fe309b"><div class="ttname"><a href="__queue_8c.html#aa4f9f9bfddcb1edb5edce74730fe309b">queue_enqueue</a></div><div class="ttdeci">int queue_enqueue(Queue Q, void *q)</div><div class="ttdoc">Agrega un elemento del tipo Alpha al final de la cola. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00049">_queue.c:49</a></div></div>
<div class="ttc" id="__queue_8c_html_aa3ba377a4b21e817c50a4e52607cb94a"><div class="ttname"><a href="__queue_8c.html#aa3ba377a4b21e817c50a4e52607cb94a">queue_destroy</a></div><div class="ttdeci">int queue_destroy(Queue Q, void **garbage)</div><div class="ttdoc">Destruye y libera la memoria de la cola Q preservando los elementos. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00131">_queue.c:131</a></div></div>
<div class="ttc" id="__queue_8c_html_ae9892369297db38bc1b7955a310f8c30"><div class="ttname"><a href="__queue_8c.html#ae9892369297db38bc1b7955a310f8c30">queue_isEmpty</a></div><div class="ttdeci">int queue_isEmpty(Queue Q)</div><div class="ttdoc">Verifica que la cola este vacía. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00114">_queue.c:114</a></div></div>
<div class="ttc" id="__queue_8c_html_a1f8653e2322de90458051e3061af90ce"><div class="ttname"><a href="__queue_8c.html#a1f8653e2322de90458051e3061af90ce">queue_dequeue</a></div><div class="ttdeci">void * queue_dequeue(Queue Q)</div><div class="ttdoc">Quita el ultimo elemento de la cola. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00075">_queue.c:75</a></div></div>
<div class="ttc" id="__queue_8c_html_a24a786275016ae7b4831f94fa44dd6a8"><div class="ttname"><a href="__queue_8c.html#a24a786275016ae7b4831f94fa44dd6a8">queue_create</a></div><div class="ttdeci">Queue queue_create(void)</div><div class="ttdoc">Crea una cola sin elementos. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00030">_queue.c:30</a></div></div>
<div class="ttc" id="__queue_8c_html_a1def9cad01fbb534514155b984cde15a"><div class="ttname"><a href="__queue_8c.html#a1def9cad01fbb534514155b984cde15a">queue_size</a></div><div class="ttdeci">int queue_size(Queue Q)</div><div class="ttdoc">Devuelve la cantidad de elementos de la cola. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00163">_queue.c:163</a></div></div>
<div class="ttc" id="__queue_8h_html"><div class="ttname"><a href="__queue_8h.html">_queue.h</a></div><div class="ttdoc">La librería _queue proporciona una serie de herramientas para almacenar cualquier tipo de elemento en...</div></div>
<div class="ttc" id="structQueue_html"><div class="ttname"><a href="structQueue.html">Queue</a></div><div class="ttdoc">Puntero a una cola. </div></div>
<div class="ttc" id="__queue_8c_html_a211ac9b50a8c7917a328cf68efb1f7e9"><div class="ttname"><a href="__queue_8c.html#a211ac9b50a8c7917a328cf68efb1f7e9">queue_head</a></div><div class="ttdeci">void * queue_head(Queue Q)</div><div class="ttdoc">Muestra la cabeza de la cola. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00099">_queue.c:99</a></div></div>
<div class="ttc" id="structQElem_html_a0f0b31748cf47160d9bfb0759ec301a2"><div class="ttname"><a href="structQElem.html#a0f0b31748cf47160d9bfb0759ec301a2">QElem::elem</a></div><div class="ttdeci">void * elem</div><div class="ttdoc">Puntero al elemento de esta estructura. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00011">_queue.c:11</a></div></div>
<div class="ttc" id="structQueueSt_html"><div class="ttname"><a href="structQueueSt.html">QueueSt</a></div><div class="ttdoc">Estructura principal de una queue. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00020">_queue.c:20</a></div></div>
<div class="ttc" id="structQueueSt_html_a47afe2083ee433b7d1a43f861482593f"><div class="ttname"><a href="structQueueSt.html#a47afe2083ee433b7d1a43f861482593f">QueueSt::tail</a></div><div class="ttdeci">QElem * tail</div><div class="ttdoc">Puntero al ultimo elemento de la cola. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00022">_queue.c:22</a></div></div>
<div class="ttc" id="structQElem_html_ac95f7bec7306cc01964153958c68843b"><div class="ttname"><a href="structQElem.html#ac95f7bec7306cc01964153958c68843b">QElem::next</a></div><div class="ttdeci">struct QElemSt * next</div><div class="ttdoc">Puntero a la siguiente estructura. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00012">_queue.c:12</a></div></div>
<div class="ttc" id="structQueueSt_html_a439227feff9d7f55384e8780cfc2eb82"><div class="ttname"><a href="structQueueSt.html#a439227feff9d7f55384e8780cfc2eb82">QueueSt::size</a></div><div class="ttdeci">int size</div><div class="ttdoc">Cantidad de elementos en la cola. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00023">_queue.c:23</a></div></div>
<div class="ttc" id="structQueueSt_html_a9547aa377ca288e36818fc398d39a826"><div class="ttname"><a href="structQueueSt.html#a9547aa377ca288e36818fc398d39a826">QueueSt::head</a></div><div class="ttdeci">QElem * head</div><div class="ttdoc">Puntero al primer elemento de la cola. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00021">_queue.c:21</a></div></div>
<div class="ttc" id="structQElem_html"><div class="ttname"><a href="structQElem.html">QElem</a></div><div class="ttdoc">Estructura que encapsula un elemento que se encola. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00010">_queue.c:10</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_5116870a98769fcb7fa621a6c1aaaf2c.html">apifiles</a></li><li class="navelem"><a class="el" href="__queue_8c.html">_queue.c</a></li>
    <li class="footer">Generado el Lunes, 29 de Septiembre de 2014 22:00:00 para Dinic por
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.8 </li>
  </ul>
</div>
</body>
</html>
